Skip to content

Validate BCs for equivalent but distinct matrix spaces#4255

Open
masaqif wants to merge 1 commit into
FEniCS:mainfrom
masaqif:fix-petrov-galerkin-bc-validation
Open

Validate BCs for equivalent but distinct matrix spaces#4255
masaqif wants to merge 1 commit into
FEniCS:mainfrom
masaqif:fix-petrov-galerkin-bc-validation

Conversation

@masaqif

@masaqif masaqif commented Jun 30, 2026

Copy link
Copy Markdown

Reject Dirichlet boundary conditions for standalone matrix assembly when the test and trial spaces use equivalent elements on the same mesh but are distinct function space objects. In this case BC row/column zeroing can happen without a diagonal insertion because the spaces are not identical.\n\nThe check is skipped for recursive PETSc MatNest sub-block assembly so existing block and mixed formulations continue to work.\n\nAdds regression coverage for both MatrixCSR and PETSc assembly.\n\nSplit out from #4249 per maintainer request.

@masaqif masaqif force-pushed the fix-petrov-galerkin-bc-validation branch from c004515 to 00a158a Compare July 1, 2026 15:05
@masaqif masaqif changed the title Validate BCs for Petrov-Galerkin matrix assembly Validate BCs for equivalent but distinct matrix spaces Jul 1, 2026
@masaqif

masaqif commented Jul 1, 2026

Copy link
Copy Markdown
Author

I narrowed the validation after CI showed that general different-degree and submesh Petrov-Galerkin assembly with BCs is supported and already covered by tests. The current check now targets only equivalent same-mesh spaces represented by distinct FunctionSpace objects, and it is bypassed for recursive MatNest sub-block assembly so existing block formulations are not rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant